//
// Created by baigui on 21-7-3.
//

#ifndef SIMPLE_PLAYER_NDKDEMUX_H
#define SIMPLE_PLAYER_NDKDEMUX_H


#include <media/NdkMediaExtractor.h>
#include "VideoRender.h"
#include "Demux.h"

class NDKDemux : public Demux {
public:
    NDKDemux(weak_ptr<MediaPlayer> player);
    ~NDKDemux();

    bool Open(void *path) override;

    bool start() override;

    void handle(int , void *) override ;

    void requestbuffer() override;


private:
    MediaStream *mMediaStream;

    AMediaExtractor *mMediaExtractor;
};


#endif //SIMPLE_PLAYER_NDKDEMUX_H
